package com.company.hrmadmin.modules.service;

import com.company.hrmadmin.modules.domain.Role;
import com.company.hrmadmin.modules.domain.UserRole;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author Xmirror
* @description 针对表【sys_user_role】的数据库操作Service
* @createDate 2022-03-18 15:39:37
*/
public interface UserRoleService extends IService<UserRole> {

    /**
     * 根据UserID查询UserRole
     * @param userId userID
     * @return UserRole
     */
    UserRole selectUserRoleByUserId(Integer userId);

    /**
     * 根据用户ID查询Role
     * @param userId 用户ID
     * @return Role
     */
    Role selectByUserId(Integer userId);

    /**
     * 根据UserId查询Role名称
     *
     * @param userId 用户ID
     * @return String
     */
    String getRoleName(Integer userId);

}
